<?php Yii::app()->clientScript->registerScriptFile(Yii::app()->params['static'].'assets/js/bootbox.min.js',2); ?>
<div class="page-header">
							<h1>
							添加评测标准
							</h1>
</div>
<div class="row">
 <div class="col-sm-12">
  	<div class="tabbable">
											<ul class="nav nav-tabs padding-12 tab-color-blue background-blue" id="myTab4">
												<li class="active">
													<a data-toggle="tab" href="#form1"><i class="icon-edit"></i>添加评测标准</a>
												</li>
                                                <li class="">
													<a data-toggle="tab" href="#form2"><i class="icon-list"></i>&nbsp;已添加的评测标准条目</a>
												</li>
											</ul>

											<div class="tab-content">
												<div id="form1" class="tab-pane active">
												  <?php $this->renderPartial("_addform");?>
												</div>
                                                <div id="form2" class="tab-pane">
													<?php $this->renderPartial("_scholarshipitemlist",array('list'=>$list));?>
												</div>
												
												
											</div>
										</div>
 
 </div>
</div>
<script type="text/javascript">
     jQuery(function($) {
		<?php 
		   if(Yii::app()->user->hasFlash('update')){
			   echo 'bootbox.alert("'.CHtml::encode(Yii::app()->user->getFlash('update')).'",function(){});';
			   
		   }
			
		?> 
		 
		// delete item
		$('[delete-item]').on('click',function(){
			var id = $(this).attr('delete-item');
			bootbox.confirm('确定删除这一条吗？',function(result){
				if(result){
					
					$.post('<?php echo Yii::app()->createUrl('scholarship/deleteitem'); ?>',{'sId':id},function(data){
						data = $.parseJSON(data);
						bootbox.alert(data['msg'],function(){
							if(data['code'] == '200'){
								$('#'+id).fadeToggle('800','linear',function(){
									$(this).remove();
									
								});
								
							}
							
						});
					});
					
					
				}
				
			})
			
		});
	 })
</script>